<%@ page language="java" contentType="text/html;charset=UTF-8" %><%@ include file="../../inc/global.jsp" 
%>
<!doctype html>
<html>
<head>
<title>${adminGlobalConfig.name}</title>
<%@include file="../head.jsp" %>
<style type="text/css">
.cancel, .already, .over, .ok {display:block; padding:3px 11px; margin:0px 0px;text-align:center; cursor:pointer;}
.cancel {background:#e6e6e6; color:#333;}
.already {background:#ff6600; color:#fff;}
.over {background:#ff0000; color:#fff;}
.ok {background:#3FA156; color:#fff;}
</style>
<script type="text/javascript">
$(function(){
	$('td span').bind('click', function(){
		var url='';
		var _id = $(this).attr('id')
		var i=_id.indexOf('_');
		var id=_id.substring(i);
		//alert(id);
		/*
		$.ajax({
			type:'POST'
			, url:url
			, data:{id:id}
			, success:function(data){
				
			}
		});
		*/
	});
});
</script>
</head>
<body>
<div class="wrapper">
<%@include file="../header.jsp" %>
<div class="body">
<div class="list">
<div class="listnav">
</div>
<table>
<thead>
<tr>
<th>用户名称</th>
<th>地区</th>
<th>任务名称</th>
<th>创建时间</th>
<th>更新时间</th>
<th>任务状态</th>
</tr>
</thead>
<c:if test="${empty(queueList)}">
<tr>
<td></td>
<td></td>
<td>暂无数据...</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</c:if>
<tbody>
<c:forEach var="item" items="${queueList}" varStatus="s">
<c:if test="${(s.index % 2) != 0}">
<tr class="trbg">
</c:if>
<c:if test="${(s.index % 2) == 0}">
<tr>
</c:if>
<td>${item.customer.name} [${item.mobile}]</td>
<td>${item.town.name} ${item.village.name}</td>
<td>${msgJob.name}</td>
<td><fmt:formatDate pattern="yy-MM-dd hh:mm:ss" value="${item.addTime}" /></td>
<td><fmt:formatDate pattern="yy-MM-dd hh:mm:ss" value="${item.updateTime}" /></td>
<td>
<c:if test="${item.status==0}">
<span class="already" id="already_${item.id}">等待发送</span>
</c:if>
<c:if test="${item.status==1}">
<span class="cancel" id="cancel_${item.id}">预留状态</span>
</c:if>
<c:if test="${item.status==2}">
<span class="over" id="over_${item.id}">取消发送</span>
</c:if>
<c:if test="${item.status==3}">
<span class="ok" id="ok_${item.id}">发送成功</span>
</c:if>
<c:if test="${item.status==4}">
<span class="cancel" id="cancel_${item.id}">发送失败</span>
</c:if>
<c:if test="${item.status==5}">
<span class="cancel" id="cancel_${item.id}">正在发送</span>
</c:if>
</td>
</tr>
</c:forEach>
</tbody>
</table>
${pagination}
</div>
<div class="sidebarMenu">
<ul>
<li><a href="/a/customer/msgJobs/create">新建群发任务</a></li>
<li><a href="/a/customer/msgJobs">返回全部任务</a></li>
</ul>
</div>
<div class="sidebar">
<div class="prop-item">
<h3>${msgJob.name}</h3>
${msgJob.content}
</div>
</div>
<!--  -->
</div>
</div>
</body>
</html>